//-----------------------------------------------------------------------------
//  Copyright (C) 2005-2008 Thomas S. Ullrich 
//
//  This file is part of the Solitaire Mahjong project.
//
//  This file may be used under the terms of the GNU General Public License.
//  This project is free software; you can redistribute it and/or modify it
//  under the terms of the GNU General Public License.
//  
//  Author: Thomas S. Ullrich
//  Last update: June 1, 2007
//-----------------------------------------------------------------------------
#ifndef smTileFactory_h
#define smTileFactory_h
 
#include <vector>
#include "smDefinitions.h"
 
using namespace std;

class QGraphicsScene;
class smTileItem;
 
class smTileFactory
{
public:
    smTileFactory(QGraphicsScene*);
    ~smTileFactory();
     
    bool makeTiles(smTileSetId id, smTileSize s);
     
    size_t       maxNumberOfTiles() const;
    int          shadowWidth() const;
    int          shadowHeight() const;
    smTileItem*  tile(unsigned int);
    vector<smTileItem*>& tiles();
     
private:
    int   mShadowWidth;
    int   mShadowHeight;
    QGraphicsScene*     mScene;
    vector<smTileItem*> mTiles;
};
 
inline size_t smTileFactory::maxNumberOfTiles() const {return mTiles.size();}
inline int smTileFactory::shadowWidth() const {return mShadowWidth;}
inline int smTileFactory::shadowHeight() const {return mShadowHeight;}
 
#endif
